DeepPytonist's profile picture. python so logic and fantastic

Pythonist

@DeepPytonist

python so logic and fantastic

Which one is a tuple and why? 1) a = 100 2) a = 100 3) a = ("tuple") 4) a = (100) #Python #Coding #Tuple


Pythonist أعاد

10. Competitive Programming in Python 128 Algorithms to Develop Your Coding Skills 🎄 ia804600.us.archive.org/14/items/compe…

swapnakpanda's tweet image. 10. Competitive Programming in Python

128 Algorithms to Develop Your Coding Skills

🎄 ia804600.us.archive.org/14/items/compe…

In Python, a tuple is defined by the comma, not parentheses! 🚨 For example, `( 1 )` is not a tuple, but `( 1 , )` is a single-element tuple! t1 = ( 1 ) # This is an integer t2 = ( 1 , ) # This is a tuple! print(type(t1)) # <class 'int'>


United States الاتجاهات

Loading...

Something went wrong.


Something went wrong.