[PDF] [PDF] Kirill Smirnov - AWS Simple Storage Service (Amazon S3)

PRACTICING CODING INTERVIEW QUESTIONS IN PYTHON Dictionary dictionary - a collection of key-value pairs where keys are unique and immutable



Previous PDF Next PDF





[PDF] Python Interview Questions - Tutorialspoint

Python has five standard data types − Numbers String Page 2 List Tuple Dictionary What is the output of print str if str = 'Hello World'? It will print complete  



[PDF] Kirill Smirnov - AWS Simple Storage Service (Amazon S3)

PRACTICING CODING INTERVIEW QUESTIONS IN PYTHON Dictionary dictionary - a collection of key-value pairs where keys are unique and immutable



[PDF] Interview - BitDegree

by covering the more general Python interview questions and answers Python has five different data types: 1 String 2 List 3 Number 4 Dictionary 5 Tuple



[PDF] Python Interview Questions - Tutorial Kart

interview questions; and covers basic, intermediate and advanced Python Mapping Dictionary Which conditional statements are available in Python ?



[PDF] PYTHON INTERVIEW QUESTIONS - HadoopExamcom

PYTHON INTERVIEW QUESTIONS Ans: Dictionary is a key value pair and will be used inside this {} You cannot have duplicate keys in dictionary Also, key 



[PDF] Python Developer interview questions - Workable Resources

This Python Developer interview profile brings together a snapshot of what to look for in candidates with a balanced sample of suitable interview questions In some respects even What are list and dict comprehensions? What do we mean  



[PDF] Interview questions on python for freshers pdf - Mozello User Files

How do I get a list of all the keys in the dictionary? Be specific in these types of Python Interview Questions and Answers dict_keys Have you already developed  



[PDF] Python Interview Questions & Answers - Prognoz Technologies

Python Interview Questions Answers Q 1) What is Python? Python help build altered and filtered lists, dictionaries or sets from a given list, dictionary or set

[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