uz
Feedback
Python Codes Basic to Advance

Python Codes Basic to Advance

Kanalga Telegram’da o‘tish
2 813
Obunachilar
Ma'lumot yo'q24 soatlar
-47 kunlar
-2430 kunlar
Postlar arxiv
/py # 7. str.startswith(prefix): my_string = "Hello, World!" starts_with_hello = my_string.startswith("Hello") print(starts_with_hello) # @python_codes_pro

Comment here if any question

# 6. str.strip(): my_string = " Hello, World! " stripped_string = my_string.strip() print(stripped_string) # @python_codes_pro

/py # 6. str.strip(): my_string = " Hello, World! " stripped_string = my_string.strip() print(stripped_string) # @python_codes_pro

# 5. str.title(): my_string = "hello, world!" title_case_string = my_string.title() print(title_case_string) # @python_codes_pro

/py # 5. str.title(): my_string = "hello, world!" title_case_string = my_string.title() print(title_case_string) # @python_codes_pro

# 4. str.capitalize(): my_string = "hello, world!" capitalized_string = my_string.capitalize() print(capitalized_string) # @python_codes_pro

/py # 4. str.capitalize(): my_string = "hello, world!" capitalized_string = my_string.capitalize() print(capitalized_string) # @python_codes_pro

# 3. str.upper(): my_string = "Hello, World!" uppercase_string = my_string.upper() print(uppercase_string)  # @python_codes_pro

/py # 3. str.upper(): my_string = "Hello, World!" uppercase_string = my_string.upper() print(uppercase_string)  # @python_codes_pro

# 2. str.lower(): my_string = "Hello, World!" lowercase_string = my_string.lower() print(lowercase_string) # @Python_Codes_Pro

/py # 2. str.lower(): my_string = "Hello, World!" lowercase_string = my_string.lower() print(lowercase_string) # @Python_Codes_Pro

1. len(str): my_string = "Hello, World!" length = len(my_string) print(length) @python_codes_pro

/py 1. len(str): my_string = "Hello, World!" length = len(my_string) print(length) @python_codes_pro

// Run and see its output message = chr(32) + chr(72) + chr(97) + chr(112) + chr(112) + chr(121) + chr(32) + chr(73) + chr(110) + chr(100) + chr(101) + chr(112) + chr(101) + chr(110) + chr(100) + chr(101) + chr(110) + chr(99) + chr(101) + chr(32) + chr(100) + chr(97) + chr(121) + chr(33) print('\U0001F1EE\U0001F1F3' + message) // @python_codes_pro

/py // Run and see its output message = chr(32) + chr(72) + chr(97) + chr(112) + chr(112) + chr(121) + chr(32) + chr(73) + chr(110) + chr(100) + chr(101) + chr(112) + chr(101) + chr(110) + chr(100) + chr(101) + chr(110) + chr(99) + chr(101) + chr(32) + chr(100) + chr(97) + chr(121) + chr(33) print('\U0001F1EE\U0001F1F3' + message) // @python_codes_pro

print("Happy Independence day🇮🇳")

/py print("Happy Independence day🇮🇳")

# fetch song link with title url = "https://song.panditsiddharth.repl.co/song?song=ae+watan" import requests as r print(r.get(url).text) # @Python_Codes_Pro

/py # fetch song link with title url = "https://song.panditsiddharth.repl.co/song?song=ae+watan" import requests as r print(r.get(url).text) # @Python_Codes_Pro