Python Flashcards
Describe Python
High Level language
Easy to start and read
Can be procedural, functional, and object oriented
Interpreted language (not compiled)
Dynamically typed
Code is portable and not platform independent
Huge user base
Lots of frameworks and tools/libraries
Particularly popular with machine learning
What are type hints
Helps to document your code
Help catch certain errors
improve IDEs and linters
Doc strings aren’t helpful to linters and there’s no strict standard
Not a great idea for small throwaway scripts as there’s a performance hit and it adds developer time
Worth it if your writing unit tests and have a large code base
use <var>: <type>
used in parameters and return types</type></var>
How do you display the python search path
import sys
print(sys.path)pwddd
What data structures are mutable and which ones are immutable?
Mutable : Dictionaries, lists, sets
Immutable: Tuples, Strings