This project contains Interview questions with solution and answers
This project is maintained by AshishNamdev
def func(user_input):
output = ""
for char in user_input:
output = char + output
return output
func("INDIA")
import array
a = [1, 2, 3]
print a[-3]
print a[-2]
print a[-1]
Yield
Keyword in python?names = ['Chris', 'Jack', 'John', 'Daman']
print(names[-1][-1])
Enumerate()
Function in python?sum
of the numbers starting from 1 to 100
?global
variable inside a function?names1 = ['Amir', 'Bear', 'Charlton', 'Daman']
names2 = names1
names3 = names1[:]
names2[0] = 'Alice'
names3[1] = 'Bob'
sum = 0
for ls in (names1, names2, names3):
if ls[0] == 'Alice':
sum += 1
if ls[1] == 'Bob':
sum += 10
print(sum)
list1 = [1, 3, 2]
print(list1 * 2)
list("hello")
?