id(object)It accepts one parameter and returns a unique identifier associated with the input object.
def myfun(*arg_list): for arg in arg_list: print (arg) myfun(1, 2, 3, 4)
1 2 3 4
def myfun(**kwargs): for emp, age in kwargs.items(): print ("%s's age is %s." %(emp, age)) myfun(John=25, Kalley=22, Tom=32)
John's age is 25. Kalley's age is 22. Tom's age is 32.
print("Welcome") print("__name__ contains: ", __name__) def main(): print("Testing the main function") if __name__ == '__main__': main()
Welcome __name__ contains: __main__ Testing the main function
# Example: Print a space instead of the new line in the end. print("practice" , end = ' ') print("python") # Printing a dot in the end. print("pythoncircle" , end = '.') print("com", end = ' ')
practice python pythoncircle.com
>>> ord("z") 122
str = 'pdf csv json' print(str.split(" ")) print(str.split())
['pdf', 'csv', 'json'] ['pdf', 'csv', 'json']