What will be the output of the following Python code snippet?
Anonymous Quiz
22%
-2 -1
23%
0
43%
error
12%
none
❤4👍1
Forwarded from Cᴏᴅᴇs Sɴɪᴘᴘᴇᴛs (Mᴜᴋᴇsʜ)
WiFi Passwords Source Code
Language: Python
Jᴏɪɴ ᴜs :- @CodesSnippet
import subprocess
data = subprocess.check_output(['netsh', 'wlan', 'show', 'profiles']).decode('utf-8', errors="backslashreplace").split('\n')
profiles = [i.split(":")[1][1:-1] for i in data if "All User Profile" in i]
for i in profiles:
try:
results = subprocess.check_output(['netsh', 'wlan', 'show', 'profile', i, 'key=clear']).decode('utf-8', errors="backslashreplace").split('\n')
results = [b.split(":")[1][1:-1] for b in results if "Key Content" in b]
try:
print ("{:<30}| {:<}".format(i, results[0]))
except IndexError:
print ("{:<30}| {:<}".format(i, ""))
except subprocess.CalledProcessError:
print ("{:<30}| {:<}".format(i, "ENCODING ERROR"))
input("")
Language: Python
Jᴏɪɴ ᴜs :- @CodesSnippet
❤2
Tips to Merge two dictionary
Language: Python
Join :- @Python_Codes_Pro
Support group :- @python_group_pro
boy={"ram":70,"Sundar":80}
girl={"riya":80,"Sonali":70}
student=boy | girl
print(student)Language: Python
Join :- @Python_Codes_Pro
Support group :- @python_group_pro
❤2
Why True in python starts from capital 'T' rather than small 't' ?
Give valid reason
❤2
❤3
If you want learn js for website development 👇join it
@react_next_js
For any problems in js site development feel free to ask questions 😊👇
@reactjs_nextjs_group
@react_next_js
For any problems in js site development feel free to ask questions 😊👇
@reactjs_nextjs_group
❤1
❤2
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Free Study Resources everything join more ✅ https://t.me/addlist/c3QWwWR-Iw4xMDNl
Subscribe Our New channel for coding, designing, hacking and computer related everything 😁
👉✅ https://youtube.com/@CODEBOMBB
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Free Study Resources everything join more ✅ https://t.me/addlist/c3QWwWR-Iw4xMDNl
Subscribe Our New channel for coding, designing, hacking and computer related everything 😁
👉✅ https://youtube.com/@CODEBOMBB
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
👍1🔥1
Alternative of print func in python
2nd method
Join :- @Python_Codes_Pro
Support group :- @python_group_pro
import logging
logging.basicConfig(level=logging.INFO)
logging.info('This is an alternative to print using logging module!')
2nd method
import sys
sys.stdout.write("This is 2nd alternative to print using logging module")
Join :- @Python_Codes_Pro
Support group :- @python_group_pro
❤2👍1
Create array in python
for More details Visit : link
Join :- @Python_Codes_Pro
Support group :- @python_group_pro
import array
l1=array.array("i",[1,2,4,8])
print(l1)
for i in l1:
print(i)
# convert array into list
to_list=l1.tolist()
print(to_list)
# convert array into byte
print(l1.tobytes())
# find type code of array
print(l1.typecode)
# give buffer info>>>> location and length of array
print(l1.buffer_info())
# find item size
print(l1.itemsize)
for More details Visit : link
Join :- @Python_Codes_Pro
Support group :- @python_group_pro
❤3
1.Write a Python script to create a list of first N terms of a Fibonacci series.
2. Write a Python script to create a list of first N prime numbers.
Join :- @Python_Codes_Pro
Support group :- @python_group_pro
2. Write a Python script to create a list of first N prime numbers.
don't use any library/module
Join :- @Python_Codes_Pro
Support group :- @python_group_pro
❤2
Class and Objects in Python
for More details Visit : Link
class Person:
std="sixth"
def __init__(self,name):
self.name=name
self.std=std
def showdeatils(self):
return f"My name is {self.name} and I`m Studying in {self.std}"
boy1=Person("Mukesh")
print(boy1.showdeatils())
for More details Visit : Link
❤1
👍1🔥1
Guess The Output?
friends = ("Osama", "Ahmed", "Sayed") friends = tuple("Elzero",) + friends[1:] print(friends)
friends = ("Osama", "Ahmed", "Sayed") friends = tuple("Elzero",) + friends[1:] print(friends)
Anonymous Quiz
21%
TypeError: can only concatenate str (not "tuple") to str
34%
('E', 'l', 'z', 'e', 'r', 'o', 'Ahmed', 'Sayed')
21%
('Elzero', 'Ahmed', 'Sayed')
25%
TypeError: can only concatenate str (not "tuple") to str
❤1
🔥2
Fade in and out for 2 seconds in video using moviepy
Language:
Jᴏɪɴ ᴜs :- @Python_Codes_Pro
Support group :- @python_group_pro
Language:
PythonJᴏɪɴ ᴜs :- @Python_Codes_Pro
Support group :- @python_group_pro
🔥2❤1
Guess the Output?Give reason in comment
print(0.1+0.2==0.3); print(0.1+0.3==0.4)
print(0.1+0.2==0.3); print(0.1+0.3==0.4)
Anonymous Quiz
61%
True True
17%
True False
12%
False, False
10%
False, True
😁4👍1🔥1