Skip to content

Latest commit

 

History

History
27 lines (23 loc) · 814 Bytes

TupleE.md

File metadata and controls

27 lines (23 loc) · 814 Bytes
a = [1,2,3,4]
b = [4,5,6,9]
o = []
for item1,item2 in zip(a,b):
  o.append(item1+item2)

print('our array is adding with',o)
## How to define a tuple ?
>>> A tuple becomes with , so,we determine it as tuple . 
 Example:
 (10) > check type it's int
 but you write it as (10,) > it's now a tuple .
 check for your own to justify the answers !
 So , question is that what comes with it in parenthesis ?
 nice one . its just u visualize it and sometimes differentiate with 
 list and other types & mentioned one things u need to know the every stuff . just keep mind mind  
 the concept that makes tuple & another things . 
 
## What is mutable means ?
>>> it just a change an / many element/s into the stuff is given . 
on the other hand immutable is that u never change any items in the stuff .