Assignment
University
University of ReginaCourse
Computer Science (UR)Pages
1
Academic year
2023
priyankavaiya07
Views
0
p {margin: 0; padding: 0;} .ft00{font-size:23px;font-family:Calibri-Light;color:#ff0000;} .ft01{font-size:16px;font-family:Calibri;color:#000000;} .ft02{font-size:23px;line-height:31px;font-family:Calibri-Light;color:#ff0000;} Q6. Copy element 44 and 55 from the following tuple into a new tuple tuple1 = (11, 22, 33, 44, 55, 66) tuple2: (44, 55) tuple1 = (11, 22, 33, 44, 55, 66) newt=() list1=list(newt) for i in tuple1: if(i==44 or i==55): list1.append(i) newt=tuple(list1) print(newt)
Creating a New Tuple with Selected Elements from an Existing Tuple
Please or to post comments