x = [1, 2, 3] * 2 print(x)
Show more
1 year ago ⢠The Python Dude
x = [1, 2, 3] * 2 print(x)
[2, 4, 6]
[1, 2, 3, 1, 2, 3]
[1, 2, 3, 2]
Error
225 votes
9
0
1 year ago ⢠The Python Dude
Cybersecurity with Python Roadmap š š Python Basics āš Networking (Sockets, Scapy) āāš Linux & Bash Fundamentals āāāš Cryptography (Hashing, Encryption) āāāāš Web Security (Requests, BeautifulSoup) āāāāāš Exploitation & Pentesting (Nmap, Metasploit, Python Scripts) āāāāāāš Malware Analysis & Reverse Engineering āāāāāāāš Bug Bounty & CTF Challenges āāāāāāāāš Build Cybersecurity Tools with Python āāāāāāāāāā Apply for Cybersecurity Roles React "š" For More
7
0
1 year ago ⢠The Python Dude
nums = [1, 10, 2, 20, 3, 30] nums.sort(key=lambda x: x % 10) print(nums)
[1, 10, 2, 20, 3, 30]
[10, 20, 30, 1, 2, 3]
[1, 2, 3, 10, 20, 30]
[1, 10, 2, 20, 3, 30]
208 answered
6
0
1 year ago ⢠The Python Dude
a = [1, 2, 3] b = a.copy() print(a == b, a is b)
A) True False
B) False False
C) True True
D) False True
270 answered
8
0
1 year ago ⢠The Python Dude
i = 1
while i<= 5:
i = i + 1
print(i)1 2 3 4 5
6
1 2 3 4
1 2 3 4 5 6
286 answered
12
0
1 year ago ⢠The Python Dude
How do you start a loop that iterates 6 times in Python?
for i = 1 to 6:
for i in range(6):
for i from 1 to 6:
for i to 6:
1.1K answered
23
0
1 year ago ⢠The Python Dude
numbers = [1, 2, 3, 4] numbers.append([5, 6]) print(len(numbers))
A) 6
B) 5
C) 4
D) Error
218 answered
9
0
1 year ago ⢠The Python Dude
a = "10" b = 2 print(int(a) * b)
A) 102
B) 20
C) Error
D) 12
257 answered
12
0
1 year ago ⢠The Python Dude
(lambda x: print((y := x + 1) + y))(11)
24
12
144
None
140 answered
4
0
1 year ago ⢠The Python Dude
print(bool([]), bool([0]), bool(0), bool(''))A) True True False False
B) False True False False
C) False False False False
D) True True True True
151 answered
9
0