What will be the output of the following Python code?
Anonymous Quiz
15%
a B C D
23%
a b c d
43%
A B C D
19%
error
👏8
What will be the output of the following Python code?
Anonymous Quiz
13%
a b c d
72%
A B C D
3%
a B C D
13%
error
What will be the output of the following Python code?
Anonymous Quiz
44%
a b c d
23%
0 1 2 3
27%
error
6%
none
❤4
Python OOP : Object Oriented Programming in Python
Python Object Oriented programming OOP advanced / Scripting for projects / automation / interview questions / beginners
⏰ Free Online Course
🎬 video lessons
Rating ⭐️: 4.6 out 5
Students 👨🎓 : 2,418
Duration ⏰ : 2hr 10min of on-demand video
Created by 👨🏫: Deepali Srivastava
🔗 COURSE LINK
#python #programming #OOP
➖➖➖➖➖➖➖➖➖➖➖➖➖➖
👉Join @python_bds for more👈
Python Object Oriented programming OOP advanced / Scripting for projects / automation / interview questions / beginners
⏰ Free Online Course
🎬 video lessons
Rating ⭐️: 4.6 out 5
Students 👨🎓 : 2,418
Duration ⏰ : 2hr 10min of on-demand video
Created by 👨🏫: Deepali Srivastava
🔗 COURSE LINK
#python #programming #OOP
➖➖➖➖➖➖➖➖➖➖➖➖➖➖
👉Join @python_bds for more👈
Udemy
Free Python Tutorial - Python OOP : Object Oriented Programming in Python
Python Object Oriented programming OOP advanced / Scripting for projects / automation / interview questions / beginners - Free Course
What will be the output of the following Python code?
Anonymous Quiz
25%
a b c d
35%
0 1 2 3
30%
error
10%
1 2 3 4
❤2
Using tuples as keys in dictionaries
Since tuples are hashable, and list is not, we must use tuple as the key if we need to create a composite key to use in a dictionary.
Example: We would come across a composite key if we need to create a telephone directory that maps, first-name, last-name, pairs of telephone numbers, etc. Assuming that we have declared the variables as last and first number, we could write a dictionary assignment statement as shown below:
Inside the brackets, the expression is a tuple. We could use tuple assignment in a for loop to navigate this dictionary.
This loop navigates the keys in the directory, which are tuples. It assigns the elements of each tuple to last and first and then prints the name and corresponding telephone number.
Tuples and dictionary
Dictionary can return the list of tuples by calling items, where each tuple is a key value pair.
🔗 Read Online
#Python #python_3
➖➖➖➖➖➖➖➖➖➖➖➖➖
Join @python_bds for more cool data science materials.
*This channel belongs to @bigdataspecialist group
Since tuples are hashable, and list is not, we must use tuple as the key if we need to create a composite key to use in a dictionary.
Example: We would come across a composite key if we need to create a telephone directory that maps, first-name, last-name, pairs of telephone numbers, etc. Assuming that we have declared the variables as last and first number, we could write a dictionary assignment statement as shown below:
directory[last,first] = number
Inside the brackets, the expression is a tuple. We could use tuple assignment in a for loop to navigate this dictionary.
for last, first in directory:
print first, last, directory[last, first]
This loop navigates the keys in the directory, which are tuples. It assigns the elements of each tuple to last and first and then prints the name and corresponding telephone number.
Tuples and dictionary
Dictionary can return the list of tuples by calling items, where each tuple is a key value pair.
a = {'x':100, 'y':200}
b = list(a.items())
print(b)
🔗 Read Online
#Python #python_3
➖➖➖➖➖➖➖➖➖➖➖➖➖
Join @python_bds for more cool data science materials.
*This channel belongs to @bigdataspecialist group
Guru99
Python TUPLE – Pack, Unpack, Compare, Slicing, Delete, Key
A Python tuple is just like a list of a sequence of immutable objects. Learn Packing, Unpacking, Comparing, Slicing and Deleting of tuples with examples in this tutorial.
👍4❤2
What will be the output of the following Python code?
Anonymous Quiz
11%
a b c d
25%
0 1 2 3
57%
error
8%
1 2 3 4
❤2
What will be the output of the following Python code snippet?
Anonymous Quiz
29%
a b c d
19%
0 1 2 3
44%
error
7%
none
❤2
Learn R and Python Programming for Data Visualization
From Raw Data to Insightful Narratives: Creating Visual Charts
⏰ Free Online Course
🎬 video lessons
Rating ⭐️: 4.6 out 5
Students 👨🎓 : 2,300
Duration ⏰ : 1hr 56min of on-demand video
Created by 👨🏫: Pranjal Srivastava, Harshit Srivastava
🔗 COURSE LINK
#python #programming #R
➖➖➖➖➖➖➖➖➖➖➖➖➖➖
👉Join @python_bds for more👈
From Raw Data to Insightful Narratives: Creating Visual Charts
⏰ Free Online Course
🎬 video lessons
Rating ⭐️: 4.6 out 5
Students 👨🎓 : 2,300
Duration ⏰ : 1hr 56min of on-demand video
Created by 👨🏫: Pranjal Srivastava, Harshit Srivastava
🔗 COURSE LINK
#python #programming #R
➖➖➖➖➖➖➖➖➖➖➖➖➖➖
👉Join @python_bds for more👈
Udemy
Free Tutorial - Learn R and Python Programming for Data Visualization
From Raw Data to Insightful Narratives: Creating Visual Charts - Free Course
❤3👍2
What will be the output of the following Python code snippet?
Anonymous Quiz
19%
abcd
49%
ABCD
31%
error
1%
none
❤5👍4