Python Codes Basic to Advance
Открыть в Telegram
Python Codes Basic to Advance All Codes @C_Codes_pro @CPP_Codes_pro @Java_Codes_Pro @nodejs_codes_pro Discussion @bca_mca_btech
Больше2 813
Подписчики
Нет данных24 часа
-47 дней
-2430 день
Архив постов
/py # 7. str.startswith(prefix):
my_string = "Hello, World!"
starts_with_hello = my_string.startswith("Hello")
print(starts_with_hello)
# @python_codes_pro
# 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
# 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
