[PDF] python download pdf
[PDF] python ebook
[PDF] python fft without numpy
[PDF] python for arcgis pro tutorial
[PDF] python for machine learning and data science
[PDF] python for machine learning beginners
[PDF] python for machine learning great learning
[PDF] python for machine learning tutorial
[PDF] python full course in hindi pdf download
[PDF] python graphics
[PDF] python graphics animation
[PDF] python hacking scripts download
[PDF] python ide for arcgis pro
[PDF] python if statement multiple conditions examples
[PDF] python import class from another file in same folder
What are the main
data structures in
Python?
PRACTICING CODING INTERVIEW QUESTIONS IN PYTHON
Kirill Smirnov
Data Science Consultant, Altran
PRACTICING CODING INTERVIEW QUESTIONS IN PYTHON
Data Structure
Data Structure - a specialized format to organize and store data.
Main Data Structures in Python:
list tuple set dictionary
PRACTICING CODING INTERVIEW QUESTIONS IN PYTHON
List list - an ordered mutable sequence of items (e.g. numbers, strings etc.)
PRACTICING CODING INTERVIEW QUESTIONS IN PYTHON
List: accessing items
PRACTICING CODING INTERVIEW QUESTIONS IN PYTHON
List: modifying items
PRACTICING CODING INTERVIEW QUESTIONS IN PYTHON
List: methods
PRACTICING CODING INTERVIEW QUESTIONS IN PYTHON
List: methods
PRACTICING CODING INTERVIEW QUESTIONS IN PYTHON
Tuple tuple - an ordered immutable sequence of items (e.g. numbers, strings etc.)
PRACTICING CODING INTERVIEW QUESTIONS IN PYTHON
Tuple: modifying values
Modifying items in a tuple is not possible.
PRACTICING CODING INTERVIEW QUESTIONS IN PYTHON
Set set - an unordered collection with no duplicate items (e.g. numbers, strings etc.)
PRACTICING CODING INTERVIEW QUESTIONS IN PYTHON
Set: methods
PRACTICING CODING INTERVIEW QUESTIONS IN PYTHON
Dictionary
dictionary - a collection of key-value pairs where keys are unique and immutable
PRACTICING CODING INTERVIEW QUESTIONS IN PYTHON
Dictionary: accessing values
Accessing a value for a key:
PRACTICING CODING INTERVIEW QUESTIONS IN PYTHON
Dictionary: modifying values
PRACTICING CODING INTERVIEW QUESTIONS IN PYTHON
Dictionary: methods
PRACTICING CODING INTERVIEW QUESTIONS IN PYTHON
Dictionary: methods
PRACTICING CODING INTERVIEW QUESTIONS IN PYTHON
Dictionary: methods
PRACTICING CODING INTERVIEW QUESTIONS IN PYTHON
Dictionary: methods
PRACTICING CODING INTERVIEW QUESTIONS IN PYTHON
Dictionary: methods
PRACTICING CODING INTERVIEW QUESTIONS IN PYTHON
Operations on Lists, Tuples, Sets, and Dictionaries
PRACTICING CODING INTERVIEW QUESTIONS IN PYTHON
Operations on Lists, Tuples, Sets, and Dictionaries
Let's practice!
PRACTICING CODING INTERVIEW QUESTIONS IN PYTHON
What are common
ways to manipulate strings?
PRACTICING CODING INTERVIEW QUESTIONS IN PYTHON
Kirill Smirnov
Data Science Consultant, Altran
PRACTICING CODING INTERVIEW QUESTIONS IN PYTHON
String
Create strings:
PRACTICING CODING INTERVIEW QUESTIONS IN PYTHON
String
ĐėčȊȋ constructor:
PRACTICING CODING INTERVIEW QUESTIONS IN PYTHON
str() contructor
PRACTICING CODING INTERVIEW QUESTIONS IN PYTHON
str() constructor
PRACTICING CODING INTERVIEW QUESTIONS IN PYTHON
Accessing characters in a string
PRACTICING CODING INTERVIEW QUESTIONS IN PYTHON
The .index() method
PRACTICING CODING INTERVIEW QUESTIONS IN PYTHON
Strings are immutable
Methods return a new string object
PRACTICING CODING INTERVIEW QUESTIONS IN PYTHON
Modifying methods 1
PRACTICING CODING INTERVIEW QUESTIONS IN PYTHON
Modifying methods 2
PRACTICING CODING INTERVIEW QUESTIONS IN PYTHON
Relation to lists
Create a string from a list of strings:
Breaking a string into a list of strings:
PRACTICING CODING INTERVIEW QUESTIONS IN PYTHON
String methods with DataFrames
PRACTICING CODING INTERVIEW QUESTIONS IN PYTHON
String methods with DataFrames
PRACTICING CODING INTERVIEW QUESTIONS IN PYTHON
String methods with DataFrames
PRACTICING CODING INTERVIEW QUESTIONS IN PYTHON
String methods with DataFrames
PRACTICING CODING INTERVIEW QUESTIONS IN PYTHON
String methods with DataFrames
Let's practice!
PRACTICING CODING INTERVIEW QUESTIONS IN PYTHON
How to write regular
expressions in
Python?
PRACTICING CODING INTERVIEW QUESTIONS IN PYTHON
Kirill Smirnov
Data Science Consultant, Altran
PRACTICING CODING INTERVIEW QUESTIONS IN PYTHON
Definition
Regular expression - a sequence of special characters (metacharacters) dening a paern to search in a text. cat "I have a cat. My cat likes to eat a lot. It also catches mice."
PRACTICING CODING INTERVIEW QUESTIONS IN PYTHON
Definition
Regular expression - a sequence of special characters (metacharacters) dening a paern to search in a text. cat "I have a cat. My cat likes to eat a lot. It also catches mice."
PRACTICING CODING INTERVIEW QUESTIONS IN PYTHON
Complex patterns
Example:
john.smith@mailbox.com is the e-mail of John. He oen writes to his boss at boss@big- company.com. But the messages get forwarded to his secretary at info@big-company.com.
PRACTICING CODING INTERVIEW QUESTIONS IN PYTHON
Complex patterns
Example:
**john.smith@mailbox.com is the e-mail of John. He oen writes to his boss at boss@big- company.com. But the messages get forwarded to his secretary at info@big-company.com**.
PRACTICING CODING INTERVIEW QUESTIONS IN PYTHON
Special characters
Simple characters and numbers are mapped onto themselves:
Dot maps to anything:
Ǻ any character
PRACTICING CODING INTERVIEW QUESTIONS IN PYTHON
Special characters
The following metacharacters represent ȉ followed by a leer: ȉŝ any alphanumeric character or underscore
ȉ any digit
ȉĐ any whitespace character
PRACTICING CODING INTERVIEW QUESTIONS IN PYTHON
Square brackets
Several metacharacters can be enclosed in square brackets:
PRACTICING CODING INTERVIEW QUESTIONS IN PYTHON
Repetitions
ȅ no character or it repeats an undened number of times
ɰ the character is present at least once
ȁ the character exists or not
Ȍǻȍ the character is present from n to m times
PRACTICING CODING INTERVIEW QUESTIONS IN PYTHON
Regular expression for an e-mail
Example:
**john.smith@mailbox.com is the e-mail of John. He oen writes to his boss at boss@company.com. But the messages get forwarded to his secretary at info@company.com**.
PRACTICING CODING INTERVIEW QUESTIONS IN PYTHON
Regular expression for an e-mail
Example:
**john.smith@mailbox.com is the e-mail of John. He oen writes to his boss at boss@company.com. But the messages get forwarded to his secretary at info@company.com**. at least one leer, digit, underscore, or dot character
PRACTICING CODING INTERVIEW QUESTIONS IN PYTHON
Regular expression for an e-mail
Example:
**john.smith@mailbox.com is the e-mail of John. He oen writes to his boss at boss@company.com. But the messages get forwarded to his secretary at info@company.com**.
PRACTICING CODING INTERVIEW QUESTIONS IN PYTHON
Regular expression for an e-mail
Example:
**john.smith@mailbox.com is the e-mail of John. He oen writes to his boss at boss@company.com. But the messages get forwarded to his secretary at info@company.com**. at least one lowercased leer
PRACTICING CODING INTERVIEW QUESTIONS IN PYTHON
Regular expression for an e-mail
Example:
**john.smith@mailbox.com is the e-mail of John. He oen writes to his boss at boss@company.com. But the messages get forwarded to his secretary at info@company.com**.
PRACTICING CODING INTERVIEW QUESTIONS IN PYTHON
Regular expression for an e-mail
Example:
**john.smith@mailbox.com is the e-mail of John. He oen writes to his boss at boss@company.com. But the messages get forwarded to his secretary at info@company.com**. at least one lowercased leer
PRACTICING CODING INTERVIEW QUESTIONS IN PYTHON
re package
PRACTICING CODING INTERVIEW QUESTIONS IN PYTHON
re.finditer()
PRACTICING CODING INTERVIEW QUESTIONS IN PYTHON
re.finditer()
PRACTICING CODING INTERVIEW QUESTIONS IN PYTHON
re.findall()
PRACTICING CODING INTERVIEW QUESTIONS IN PYTHON
re.split()
Let's practice!
PRACTICING CODING INTERVIEW QUESTIONS IN PYTHON
quotesdbs_dbs19.pdfusesText_25