#14 index()
my_list11 = [47, 48, 49, 50]
index = my_list11.index(49)
print(index)
#15 count()
my_list12 = [51, 52, 53, 54, 55, 52]
count = my_list12.count(52)
print(count)
#16 reverse()
my_list13 = [56, 57, 58, 59, 60]
my_list13.reverse()
print(my_list13)
#17 clear()
my_list14 = [61, 62, 63]
my_list14.clear()
print(my_list14)
\/original_list = [64, 65, 66]
#18 copy()
original = [3, 6, 6, 8]
new_list = original.copy()
print(new_list)
#19 sort()
my_list15 = [67, 68, 69, 70]
my_list15.sort()
print(my_list15)
👍1
#20 any()
# @Python_Codes_Pro
# with @IOChannel_bot 😎
# this bot is only for channels
# ask on @Logicb_Support
boolean_list = [True, False, False]
result = any(boolean_list)
print(result)
# @Python_Codes_Pro
# with @IOChannel_bot 😎
# this bot is only for channels
# ask on @Logicb_Support
👍1
List functions in Python
Telegram.me/Python_Codes_Pro/249
Telegram.me/Python_Codes_Pro/249
Python Codes Basic to Advance pinned «List functions in Python Telegram.me/Python_Codes_Pro/249»
# भगवत गीता - Bhagwat Geeta summary
import urllib.request
import json
chapter = input("Enter chapter number: ")
url = "https://bhagavad-gita3.p.rapidapi.com/v2/chapters/" + chapter + "/"
headers = {
"X-RapidAPI-Key": "00172e5054mshf7fe92ad8b4a5aap1ffa03jsnff24b9e4d834",
"X-RapidAPI-Host": "bhagavad-gita3.p.rapidapi.com"
}
req = urllib.request.Request(url, headers=headers)
with urllib.request.urlopen(req) as response:
data = response.read().decode('utf-8')
out = json.loads(data)
print(f"Chapter name: {out['name']}")
print(f"Summary in Hindi: {out['chapter_summary_hindi']}")
print(f"Summary in English: {out['chapter_summary']}")
😁1
Current datetime using python of India.
Are you added coding folder? 👇
https://t.me/addlist/2UhsQW_cGzkxMzg1
Are you added coding folder? 👇
https://t.me/addlist/2UhsQW_cGzkxMzg1
❤3
import urllib.request
import json
input=input("enter text to generate hastag : ")
url=f"https://mukesh-api.vercel.app/hastag/{input}"
req = urllib.request.Request(url)
with urllib.request.urlopen(req) as response:
data = response.read().decode('utf-8')
out = json.loads(data)
print(out)
❤1
Practice js 👇👇
Index:
Loops: https://t.me/nodejs_codes_pro/120
Lists ( Array ): https://t.me/nodejs_codes_pro/123
Strings: https://t.me/nodejs_codes_pro/148
Objects: https://t.me/nodejs_codes_pro/172
Numbers: https://t.me/nodejs_codes_pro/202
Index:
Loops: https://t.me/nodejs_codes_pro/120
Lists ( Array ): https://t.me/nodejs_codes_pro/123
Strings: https://t.me/nodejs_codes_pro/148
Objects: https://t.me/nodejs_codes_pro/172
Numbers: https://t.me/nodejs_codes_pro/202
👏2
Now it's discussion group is public you can join it
https://t.me/python_group_pro
https://t.me/python_group_pro
Select your group/channel/service
t.me/Sid_info/69
t.me/Sid_info/69
import urllib.request
import json
url=f"https://mukesh-api.vercel.app/mahadev"
req = urllib.request.Request(url)
with urllib.request.urlopen(req) as response:
data = response.read().decode('utf-8')
out = json.loads(data)
print(out["result"])
Are you added coding folder? 👇
https://t.me/addlist/2UhsQW_cGzkxMzg1
❤1
import pyshorteners
link =input("enter the url link")
shortener = pyshorteners.Shortener()
try:
tiny_link = shortener.tinyurl.short(link)
print(" shortend url Link :- ", tiny_link)
except:
print("error while converting shorts link")
Are you added coding folder? 👇
https://t.me/addlist/2UhsQW_cGzkxMzg1
❤2🔥1