#Zip operator example:-
myLst1 = ["Reddit","Twitter","Facebook"]
myLst2 = [1,2,3]
myLst3 = ["TV", "Internet", "VOD"]
for myLst in zip(myLst1,myLst2,myLst3):
print(myLst)
==========================================
#To find temperature in Fahrenheit:-
from pip._vendor.distlib.compat import raw_input
mytemp1 = float(input("Please enter the temperature in Celsius:"))
fH = ((9/5*mytemp1 + 32))print(fH)
===================================
#To find the first letter using (.split) function from any sentence:-
kt = "Print't, that the King of this kingdom is keeping his good deeds."
print(kt)
for word1 in kt.split():
if word1[0] =="k" or word1[0] =="K":
print(word1)
==================================
https://github.com/bornfreesoul/PythonLessons
https://www.youtube.com/channel/UCe0rLJmSQXNoK2Mo2eMVuvg
myLst1 = ["Reddit","Twitter","Facebook"]
myLst2 = [1,2,3]
myLst3 = ["TV", "Internet", "VOD"]
for myLst in zip(myLst1,myLst2,myLst3):
print(myLst)
==========================================
#To find temperature in Fahrenheit:-
from pip._vendor.distlib.compat import raw_input
mytemp1 = float(input("Please enter the temperature in Celsius:"))
fH = ((9/5*mytemp1 + 32))print(fH)
===================================
#To find the first letter using (.split) function from any sentence:-
kt = "Print't, that the King of this kingdom is keeping his good deeds."
print(kt)
for word1 in kt.split():
if word1[0] =="k" or word1[0] =="K":
print(word1)
==================================
https://github.com/bornfreesoul/PythonLessons
https://www.youtube.com/channel/UCe0rLJmSQXNoK2Mo2eMVuvg
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.