pw Python
# # get ascii value from character
# str="A"
# print(ord(str))
# # get character from ascii value
# ascii=65
# print(chr(ascii))
# # seprate
# age=22
# name="ved"
# percentage=89.98
# print(age,name,percentage,sep="-") output-> 22-ved-89.98
# # // operator - give near integer value
# a=4
# b=3
# print(a//b) output-> 1
# # identity operators compare the memory
# # locations of two objects to determine
# # if they are the exact same instance in memory.
# a=5
# b=5
# print(a is b)
# # membership operator - in , not in
# # return true if a sequence with the specified value present in the object.
# list=["ved","sneha","tarun","sam","dhruv"]
# print("sam" in list)
# print("prashant" not in list)
Comments
Post a Comment