Top Python Quiz Questions ๐Ÿ
1.69K subscribers
81 photos
4 links
๐ŸŽ“๐Ÿ”ฅ๐Ÿ’พ If you want to acquire a solid foundation in Python and/or your goal is to prepare for the exam, this channel is definitely for you.
๐ŸคณFeel free to contact us - @topProQ
And if you are interested in Java https://t.me/topJavaQuizQuestions
Download Telegram
Code snippet:
from numbers import Number
from decimal import Decimal
from fractions import Fraction

print(isinstance(2.0, Number), end = ' ')
print(isinstance(Decimal('2.0'), Number), end = ' ')
print(isinstance(Fraction(2, 1), Number), end = ' ')
print(isinstance("2", Number), end = ' ')
Code snippet:
x = ['ab', 'cd']
for i in x:
i.upper()
print(x)
Code snippet:
from functools import reduce
numbers = [1, 2, 3]
reduce(lambda x, y: x + y, numbers)
Code snippet:
x=1
def cg():
global x
x=x+1
cg()
x
Code snippet:
def foo(k):
k = [1]
q = [0]
foo(q)
print(q)
Code snippet:
print("abc DEF".capitalize())
Code snippet:
class A:
@staticmethod
def a(x):
print(x)
A.a(100)
Code snippet:
def foo(k):
k = [1]

q = [0]
foo(q)
print(q)
Code snippet:
a = [0, 1, 2, 3]
for a[0] in a:
print(a[0])