a = {():[]}
print(type(a))
b = {[]:()} print(type(b))
print(type(a))
b = {[]:()} print(type(b))
Anonymous Quiz
18%
dict, dict
45%
dict, TypeError
28%
TypeError, dict
10%
TypeError, TypeError
console.log(0 == []);
console.log(0 == '0');
console.log('0' == []);
console.log(0 == '0');
console.log('0' == []);
Anonymous Quiz
10%
true, true, true
24%
true, true, false
32%
true, false, false
20%
false, false, false
10%
false, false, true
5%
false, true, true
👍2
Guess The Output?
my_list = [True, False, True, None, True]; print(any(my_list)); print(all(my_list))
my_list = [True, False, True, None, True]; print(any(my_list)); print(all(my_list))
Anonymous Quiz
7%
None , None
24%
Error
29%
False , True
31%
True , False
10%
True , True
Tip : Use the zip() function to iterate over multiple iterables simultaneously
Example:
Benefits:
* Simplifies the process of iterating over multiple lists or tuples
* Ensures that the elements from corresponding lists are aligned
Language:
Jᴏɪɴ ᴜs :- @CodesSnippet
Example:
# Create two lists
names = ["John", "Mary", "Bob"]
ages = [30, 25, 40]
# Iterate over both lists using zip()
for name, age in zip(names, ages):
print(f"{name} is {age} years old.")
Benefits:
* Simplifies the process of iterating over multiple lists or tuples
* Ensures that the elements from corresponding lists are aligned
Language:
PythonJᴏɪɴ ᴜs :- @CodesSnippet
for(var i=0; i<5; i++) {
setTimeout(() => {
console.log(i); }); }
setTimeout(() => {
console.log(i); }); }
Anonymous Quiz
22%
0, 1, 2, 3, 4
22%
1, 2, 3, 4, 5
27%
0, 0, 0, 0, 0
18%
5, 5, 5, 5, 5
10%
Invalid dataType
👍1
for(let i=0; i<5; i++) {
setTimeout(() => {
console.log(i); }); }
setTimeout(() => {
console.log(i); }); }
Anonymous Quiz
16%
0, 0, 0, 0, 0
25%
0, 1, 2, 3, 4
35%
1, 2, 3, 4, 5
18%
5, 5, 5, 5, 5
6%
ValueError
Python Logo Source Code
Language: Python
Jᴏɪɴ ᴜs :- @CodesSnippet
import turtle
t = turtle.Turtle()
s = turtle.Screen()
s.bgcolor("black")
t.speed(10)
t.pensize(2)
t.pencolor("white")
def s_curve():
for i in range(90):
t.left(1)
t.forward(1)
def r_curve():
for i in range(90):
t.right(1)
t.forward(1)
def l_curve():
s_curve()
t.forward(80)
s_curve()
def l_curve1():
s_curve()
t.forward(90)
s_curve()
def half():
t.forward(50)
s_curve()
t.forward(90)
l_curve()
t.forward(40)
t.left(90)
t.forward(80)
t.right(90)
t.forward(10)
t.right(90)
t.forward(120) #on test
l_curve1()
t.forward(30)
t.left(90)
t.forward(50)
r_curve()
t.forward(40)
t.end_fill()
def get_pos():
t.penup()
t.forward(20)
t.right(90)
t.forward(10)
t.right(90)
t.pendown()
def eye():
t.penup()
t.right(90)
t.forward(160)
t.left(90)
t.forward(70)
t.pencolor("black")
t.dot(35)
def sec_dot():
t.left(90)
t.penup()
t.forward(310)
t.left(90)
t.forward(120)
t.pendown()
t.dot(35)
t.fillcolor("#306998")
t.begin_fill()
half()
t.end_fill()
get_pos()
t.fillcolor("#FFD43B")
t.begin_fill()
half()
t.end_fill()
eye()
sec_dot()
def pause():
t.speed(2)
for i in range(100):
t.left(90)
pause()
Language: Python
Jᴏɪɴ ᴜs :- @CodesSnippet
👍1
Forwarded from Python Codes Basic to Advance (</> Mᴜᴋᴇsʜ </>)
📽 Web Automation and Scraping using Python - Udemy
✅ By: @Python_Codes_Pro
More likes => more courses 🫶
Courses link :- https://t.me/Python_Codes_Pro/434
✅ By: @Python_Codes_Pro
More likes => more courses 🫶
Courses link :- https://t.me/Python_Codes_Pro/434
❤1
Cᴏᴅᴇs Sɴɪᴘᴘᴇᴛs
👾
Choose correct option»
Anonymous Quiz
26%
[100, 330, 2, 70]
39%
[2, 70, 100, 330]
21%
[100, 2, 330, 70]
13%
Error
# Generate AI image with the input text
By : @mr_sukkun
for more visit : https://pypi.org/project/MukeshAPI/
pip install --upgrade MukeshAPI
from MukeshAPI import api
response = api.ai_image("cute boy pic")
#print(response)
with open("mukesh.jpg", 'wb') as f:
f.write(response)
print("image generated successfully")
By : @mr_sukkun
for more visit : https://pypi.org/project/MukeshAPI/
❤1
Forwarded from Python Codes Basic to Advance (</> Mᴜᴋᴇsʜ </>)
console.log(0 === false);
console.log(Object.is(0, false));
console.log(Object.is(0, false));
Anonymous Quiz
41%
false, false
21%
true, true
26%
true, false
13%
false, true