Stellar Study Cards

Python Programming Flashcards

96 Total Cards in This Deck

Python Programming Flashcards

Arrow keys or swipe to navigate cards

1 / 96 Total
Python Basics

What are Python's core data types?

2 / 96 Total
Python Basics

What is the difference between \(\texttt{list}\) and \(\texttt{tuple}\)?

3 / 96 Total
Control Structures

What are Python's control structures?

4 / 96 Total
Functions

How do you define a function in Python?

5 / 96 Total
Data Structures

What is the difference between a \(\texttt{set}\) and a \(\texttt{dict}\)?

6 / 96 Total
Python Basics

What is a Python \(\texttt{module}\)?

7 / 96 Total
Error Handling

What is a Python \(\texttt{try-except}\) block?

8 / 96 Total
Libraries

What is \(\texttt{pandas}\), and why is it used?

9 / 96 Total
Libraries

What is \(\texttt{NumPy}\), and why is it used?

10 / 96 Total
OOP

What is a Python class, and how do you define one?

11 / 96 Total
OOP

What is the difference between \(\texttt{instance}\) and \(\texttt{class}\) variables?

12 / 96 Total
Python Basics

What is the difference between \(\texttt{==}\) and \(\texttt{is}\)?

13 / 96 Total
Advanced Topics

What is a Python generator?

14 / 96 Total
Advanced Topics

What is the Global Interpreter Lock (GIL) in Python?

15 / 96 Total
Libraries

How do you install Python libraries?

16 / 96 Total
Python Basics

What is Python's \(\texttt{NoneType}\)?

17 / 96 Total
Data Structures

How do you merge two dictionaries in Python?

18 / 96 Total
Control Structures

What is a \(\texttt{break}\) statement in Python?

19 / 96 Total
Functions

What are Python's anonymous functions?

20 / 96 Total
Data Structures

What is a Python dictionary?

21 / 96 Total
Data Structures

How do you add a key-value pair to a dictionary?

22 / 96 Total
Data Structures

What is a Python \(\texttt{set}\), and how is it different from a \(\texttt{list}\)?

23 / 96 Total
Control Structures

What is the difference between \(\texttt{continue}\) and \(\texttt{break}\)?

24 / 96 Total
Functions

What is a default parameter in Python?

25 / 96 Total
Functions

How do you return multiple values from a Python function?

26 / 96 Total
OOP

What is inheritance in Python?

27 / 96 Total
OOP

What is method overriding in Python?

28 / 96 Total
Error Handling

What is the difference between \(\texttt{try-except}\) and \(\texttt{try-finally}\)?

29 / 96 Total
Libraries

What is \(\texttt{matplotlib}\), and what is it used for?

30 / 96 Total
Libraries

What is \(\texttt{scikit-learn}\)?

31 / 96 Total
Data Structures

What is slicing in Python?

32 / 96 Total
Advanced Topics

What is a Python decorator?

33 / 96 Total
Advanced Topics

What is Python's with statement used for?

34 / 96 Total
Advanced Topics

What is the difference between \(\texttt{deepcopy}\) and \(\texttt{copy}\)?

35 / 96 Total
Libraries

What is \(\texttt{TensorFlow}\)?

36 / 96 Total
Libraries

What is \(\texttt{Flask}\), and why is it used?

37 / 96 Total
Control Structures

What is a \(\texttt{while}\) loop, and how is it used?

38 / 96 Total
Data Structures

How do you create a list comprehension in Python?

39 / 96 Total
Data Structures

What is a Python \(\texttt{range}\) object?

40 / 96 Total
Control Structures

What is a for loop in Python, and how does it work?

41 / 96 Total
Python Basics

What is the purpose of \(\texttt{print()}\) in Python?

42 / 96 Total
Python Basics

What is a \(\texttt{variable}\) in Python?

43 / 96 Total
Data Structures

What is a \(\texttt{list}\) comprehension, and how is it used?

44 / 96 Total
Functions

What are keyword arguments in Python?

45 / 96 Total
Functions

What is a \(\texttt{lambda}\) function in Python?

46 / 96 Total
Error Handling

What does the \(\texttt{finally}\) block do in Python?

47 / 96 Total
OOP

What is an \(\texttt{object}\) in Python?

48 / 96 Total
OOP

What is encapsulation in Python?

49 / 96 Total
Libraries

What is requests, and how is it used?

50 / 96 Total
Libraries

What is \(\texttt{BeautifulSoup}\), and what is it used for?

51 / 96 Total
Data Structures

What is a Python \(\texttt{tuple}\), and when should you use it?

52 / 96 Total
Data Structures

How do you create a dictionary in Python?

53 / 96 Total
Advanced Topics

What is a Python context manager?

54 / 96 Total
Advanced Topics

What are Python's \(\texttt{*args}\) and \(\texttt{**kwargs}\)?

55 / 96 Total
Python Basics

What is Python's \(\texttt{pass}\) statement?

56 / 96 Total
Control Structures

What is a nested loop in Python?

57 / 96 Total
Control Structures

What is the purpose of \(\texttt{else}\) in a loop?

58 / 96 Total
Advanced Topics

What is a \(\texttt{metaclass}\) in Python?

59 / 96 Total
Advanced Topics

What are Python's async and await keywords?

60 / 96 Total
Python Basics

How do you check the length of a sequence in Python?

61 / 96 Total
Data Structures

How do you access elements in a list?

62 / 96 Total
Data Structures

How do you reverse a list in Python?

63 / 96 Total
Libraries

What is \(\texttt{os}\), and how is it used?

64 / 96 Total
Libraries

What is \(\texttt{sys}\), and what is it used for?

65 / 96 Total
Advanced Topics

What is a Python \(\texttt{iterator}\)?

66 / 96 Total
Advanced Topics

What is a Python generator expression?

67 / 96 Total
OOP

What is polymorphism in Python?

68 / 96 Total
OOP

What is abstraction in Python?

69 / 96 Total
Error Handling

What is a \(\texttt{try-except-else}\) block in Python?

70 / 96 Total
Error Handling

What does \(\texttt{raise}\) do in Python?

71 / 96 Total
Data Structures

What is \(\texttt{deque}\) in Python?

72 / 96 Total
Libraries

What is itertools, and why is it useful?

73 / 96 Total
Data Structures

How do you convert a \(\texttt{list}\) to a \(\texttt{set}\)?

74 / 96 Total
Control Structures

How do you exit a loop prematurely?

75 / 96 Total
Control Structures

What is a \(\texttt{pass}\) statement in Python?

76 / 96 Total
Functions

What are \(\texttt{nested functions}\) in Python?

77 / 96 Total
Python Basics

What is the \(\texttt{isinstance()}\) function in Python?

78 / 96 Total
Python Basics

How do you create a multiline string in Python?

79 / 96 Total
Data Structures

What is the difference between \(\texttt{pop()}\) and \(\texttt{remove()}\) in a list?

80 / 96 Total
Data Structures

How do you sort a list in Python?

81 / 96 Total
Libraries

What is \(\texttt{random}\), and how do you generate a random number?

82 / 96 Total
Libraries

What is \(\texttt{time}\), and how is it used?

83 / 96 Total
Functions

What is recursion in Python?

84 / 96 Total
Functions

How do you create a function with a variable number of arguments?

85 / 96 Total
Error Handling

What is an \(\texttt{AssertionError}\) in Python?

86 / 96 Total
Error Handling

How do you define a custom exception in Python?

87 / 96 Total
Advanced Topics

What is a descriptor in Python?

88 / 96 Total
Advanced Topics

What is the purpose of \(\texttt{global}\) in Python?

89 / 96 Total
Data Structures

How do you create a shallow copy of a list?

90 / 96 Total
Data Structures

What is the difference between \(\texttt{set.add()}\) and \(\texttt{set.update()}\)?

91 / 96 Total
Libraries

What is \(\texttt{json}\), and how do you use it?

92 / 96 Total
Libraries

How do you open a file in Python?

93 / 96 Total
Control Structures

What is the difference between \(\texttt{if-elif-else}\) and multiple \(\texttt{if}\) statements?

94 / 96 Total
Control Structures

How do you iterate over a dictionary?

95 / 96 Total
Advanced Topics

What is Python's @property decorator?

96 / 96 Total
Advanced Topics

What is a \(\texttt{weakref}\) in Python?