data-visualization-with-python-create-an-impact-with.epub
16.5 MB
Data Visualization with Python
Mario Dobler, 2019
Mario Dobler, 2019
👍2
Difference between list and tuple in python
🔸List is mutable ( you can modify the original list) and it's values are written in sqare brackets [ ]
🔸Tuple is immutable ( you can't modify it) and it's values are written in parentheses ( ) delimited by comma( , )
🔸To convert list to tuple - we use tuple() function
list1 = [1,2,3]
print(tuple(list1)) Output : (1,2,3)
🔸 For single element list
list1 = [1]
print(tuple(list1)) Output : (1, )
▪️a tuple is a tuple because of comma not because of parentheses
🔸List is mutable ( you can modify the original list) and it's values are written in sqare brackets [ ]
🔸Tuple is immutable ( you can't modify it) and it's values are written in parentheses ( ) delimited by comma( , )
🔸To convert list to tuple - we use tuple() function
list1 = [1,2,3]
print(tuple(list1)) Output : (1,2,3)
🔸 For single element list
list1 = [1]
print(tuple(list1)) Output : (1, )
▪️a tuple is a tuple because of comma not because of parentheses
👍22❤2🔥2👏1😐1
Building Python Web APIs with FastAPI.pdf
9.4 MB
Building Python Web APIs with FastAPI
Abdulazeez Abdulazeez Adeshina, 2022
Abdulazeez Abdulazeez Adeshina, 2022
👍5
Forwarded from Python Projects & Free Books
Intro to Python for Computer Science.pdf
17.5 MB
Intro to Python for Computer Science and Data Science
Paul & Harvey Deitel, 2022
Paul & Harvey Deitel, 2022
👍9❤1🔥1
The Python Book_ The ultimate guide to coding with Python.pdf
28.2 MB
The Python Book
Linux User Staff, 2022
Linux User Staff, 2022
❤13👍6
Python tricks and tips
Reverse a list
Code snippet to copy:
Reverse a list
Code snippet to copy:
a=[10,9,8,7]
print(a[::-1])
👍23🏆4