Python

0.0(0)
studied byStudied by 1 person
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/76

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

77 Terms

1
New cards

Python

A high-level, interpreted programming language known for its easy readability.

2
New cards

Variable

A container for storing data values. Example: x = 5.

3
New cards

Data Types

Types of data representing the kind of value that can be stored. Examples: int, float, str.

4
New cards

List

A collection of items in a single variable. Example: my_list = [1, 2, 3].

5
New cards

Tuple

An immutable collection of items. Example: my_tuple = (1, 2, 3).

6
New cards

Dictionary

A collection of key-value pairs. Example: my_dict = {'name': 'Alice', 'age': 25}.

7
New cards

Function

A block of reusable code that performs a specific task. Example: def my_function(): return 'Hello'.

8
New cards

Conditionals

Used to perform different actions based on different conditions. Example: if x > 10: print('x is greater than 10').

9
New cards

Loop

A programming structure that repeats a block of code. Example: for i in range(5): print(i).

10
New cards

Import

To bring in external libraries or modules. Example: import math.

11
New cards

List Comprehension

A concise way to create lists. Example: squares = [x**2 for x in range(10)].

12
New cards

Lambda Function

An anonymous function defined with the lambda keyword. Example: f = lambda x: x + 1.

13
New cards

Error Handling

Using try and except blocks to manage exceptions. Example: try: print(1/0) except ZeroDivisionError: print('Divided by zero').

14
New cards

Object-Oriented Programming

A programming paradigm based on the concept of objects. Example: class Car, my_car = Car().

15
New cards

Class

A user-defined blueprint for creating objects. Example: class Dog: pass.

16
New cards

Inheritance

The mechanism of acquiring properties from another class. Example: class Puppy(Dog): pass.

17
New cards

Polymorphism

The ability to present the same interface for different data types.

18
New cards

File Handling

Reading from and writing to files. Example: with open('file.txt', 'r') as f: content = f.read().

19
New cards

Modules

Files containing Python code that can be imported and used in other files.

20
New cards

Virtual Environment

An isolated Python environment for package management.

21
New cards

pip

Package installer for Python, used to install and manage software packages.

22
New cards

Framework

A collection of libraries that provide a standard way to build and deploy applications. Example: Flask, Django.

23
New cards

Decorator

A function that modifies another function's behavior. Example: @app.route('/').

24
New cards

Generator

A special type of iterator that yields values one at a time. Example: def my_gen(): yield 1.

25
New cards

Iterator

An object that can be iterated upon, returning one element at a time.

26
New cards

List Methods

Functions available to lists. Example: my_list.append(4).

27
New cards

String Methods

Functions available to strings. Example: my_str.upper().

28
New cards

Lambda Expressions

Anonymous functions defined using the lambda keyword.

29
New cards

Scope

The context in which a variable is defined and can be accessed.

30
New cards

Global Variable

A variable defined outside any function, accessible globally.

31
New cards

Local Variable

A variable defined within a function, accessible only within that function.

32
New cards

Python Built-in Functions

Functions available by default in Python. Example: len(), type().

33
New cards

Comprehensions

Concise methods for creating lists, sets, and dictionaries.

34
New cards

Try/Except

Error handling using try and except blocks.

35
New cards

AS keyword

Used in import statements to create an alias. Example: import numpy as np.

36
New cards

Enumerate Function

Adds a counter to an iterable. Example: for index, value in enumerate(my_list): print(index, value).

37
New cards

Join Method

Combines a list of strings into a single string. Example: ', '.join(my_list).

38
New cards

Split Method

Divides a string into a list based on a delimiter. Example: my_str.split(',').

39
New cards

Map Function

Applies a function to all items in an input list. Example: list(map(str, my_list)).

40
New cards

Filter Function

Filters items out of a list based on a condition. Example: list(filter(lambda x: x > 5, my_list)).

41
New cards

Reduce Function

Reduces a list to a single value using a binary function. Example: from functools import reduce; reduce(lambda x, y: x + y, my_list).

42
New cards

Set

An unordered collection of unique items. Example: my_set = {1, 2, 3}.

43
New cards

Set Operations

Operations such as union, intersection, and difference. Example: set1.union(set2).

44
New cards

Regular Expressions

A sequence of characters that forms a search pattern.

45
New cards

Web Scraping

Extracting data from websites using libraries like BeautifulSoup.

46
New cards

API

Application Programming Interface, a set of tools for building software applications.

47
New cards

Requests Module

A popular HTTP library for sending network requests.

48
New cards

JSON Module

A library for parsing JSON data in Python.

49
New cards

Unit Testing

Testing individual components of code using frameworks like unittest.

50
New cards

Scripting

Writing short programs to automate tasks.

51
New cards

List Slice

Accessing a portion of a list. Example: my_list[1:3].

52
New cards

Tuple Unpacking

Assigning values from a tuple to variables. Example: x, y = my_tuple.

53
New cards

Timestamp

A representation of a point in time, important for logging.

54
New cards

Date/Time Module

A module for manipulating dates and times. Example: from datetime import datetime.

55
New cards

Context Managers

A way to allocate and free resources precisely when you want to.

56
New cards

F-Strings

Formatted string literals for easier string formatting. Example: f'Hello, {name}'.

57
New cards

Shell Scripting

Writing scripts for command-line interface operations.

58
New cards

Concurrency

Running tasks simultaneously. Example: using the asyncio library.

59
New cards

Web Development

Creating web applications using frameworks like Flask and Django.

60
New cards

Data Analysis

Using libraries like Pandas and NumPy to analyze data.

61
New cards

Object Serialization

Converting an object to a format that can be easily saved to a file or database. Example: using pickle.

62
New cards

Memory Management

How Python manages memory and garbage collection.

63
New cards

Multithreading

A technique to run multiple threads in a single process.

64
New cards

Multiprocessing

A technique to run multiple processes, allowing CPU-bound tasks to perform better.

65
New cards

Database Connectivity

Interacting with databases using libraries like SQLite, SQLAlchemy.

66
New cards

Deployment

The process of making a web application or service available for use.

67
New cards

Type Hints

A feature that allows specifying the data types of function parameters and return values.

68
New cards

Decorator Arguments

Passing arguments into decorators.

69
New cards

Static Typing

Specifying the type of a variable when declaring it, introduced with type hints.

70
New cards

Dynamic Typing

The type of variable is interpreted at runtime.

71
New cards

Immutable Data Types

Types that cannot be modified after their creation. Examples: strings, tuples.

72
New cards

Mutable Data Types

Types that can be changed after their creation. Examples: lists, dictionaries.

73
New cards

Command-Line Arguments

Inputs to a program provided when the program is run from the terminal.

74
New cards

Virtual Dictionary

Using only Python dictionaries to store complex data structures.

75
New cards

Meta Programming

Programming techniques for writing programs that manipulate other programs.

76
New cards

Mixed Data Type Handling

Handling multiple data types in operations, for instance when working with lists.

77
New cards

Unit Tests

Automated tests for checking that certain parts of software work as required.