#python
#pythonprogramming
Python MCQ Questions and answers,
Python MCQ , Python Programming,
Python mutable objects,
Tuples⇒immutable sequences, typically used to store collections of heterogeneous data.
Actually comma makes a tuple, not parentheses (). The parentheses are optional, except in the empty tuple.
Tuple creation: using constructor tuple(), using iterable,
But tuple can store immutable sequences.
tuple packing,
NIELIT M3-R5 Course 'O' Level Certification,
#pythontutorial #pythonforbeginners #pythonlists
#pythonlist
#pythondeveloper #pythoncoding #learnpython
#pythonquiz #python3 #pythonskills #codingpython
#pythonbasics #pythonbeginner #pythonprogramming
#datascience #dataanalytics
#codingquiz #quizchallenge #codingcommunity
#freshers #techtalk #top10
#interviewpreparation #interviewhacks #interviewquestions #interviewskills
Ace your Python exams with this MCQ marathon!
Covers various Python concepts, including input/output, data structures, and more.
#PythonMCQs #PythonInterview #CodingQuiz #PythonProgramming #TechSkills
#ssitlecturestamil @ssitlecturestamilதமிழ்
Tuples⇒immutable sequences, typically used to store collections of heterogeneous data.
Actually comma makes a tuple, not parentheses (). The parentheses are optional, except in the empty tuple.
Tuple Creation
Empty:
t=() or tuple()
print(t)→()
One itm:
t=v, or (v,)
print(t)→(v,)
Multiple itms(Tuple Packing):
t=v1,v2 or v1,v2 or (v1,v2) or (v1,v2,)
print(t)→(v1,v2)
Using Iterable:
t=tuple(itr)
t→tuple var., v→value
c creates int var, others are valid way of tuple creation.
Note:
p = ([6,9])→[6,9]
q = ([6,9],)→([6,9],)
r = tuple([6,9]) or tuple([6,9],)→(6,9)
s = tuple('Tom')→('T',',o','m')
x,y=7,,3→SyntaxError
Информация по комментариям в разработке