Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #question builded 1
- my_str3="maryam"
- my_str4="meryam"
- count=0
- for value in my_str3:
- if my_str3[count]==my_str4[count]:
- print("equal")
- else:
- print("unequal")
- count=count+1
- #question builded 2
- sum=[]
- myList1=[1,2,3,4]
- myList2=[5,6,7,8]
- count2=0
- if len(myList1) == len(myList2):
- for value in myList1:
- sum.append(myList1[count2]+myList2[count2])
- count2=count2+1
- elif len(myList1) != len(myList2):
- print("unequal lenght of both list")
- print(*sum)
- #question 3 builded
- tempList=[]
- ans=input("enter?")
- while (ans=='y'):
- username=input("username : ")
- password=input("password : ")
- tempList.append({username:password})
- ans = input("enter?")
- print(tempList)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement