Python Functions (original) (raw)

What will be the output of the following code :

Python `

print(type(type(int)))

`

What is the output of the following code :

python `

li = ['a','b','c','d'] print("".join(li))

`

What is the output of the following segment :

Python `

print(chr(ord('A')))

`

What is the output of the following program :

python `

y = 8 z = lambda x : x * y print(z(6))

`

What is called when a function is defined inside a class?

Which of the following is the use of id() function in python?

What is the output of the following program :

python `

import re s = 'horses are fast'

regex = re.compile(r'(?P\w+) (?P\w+) (?P\w+)') matched = re.search(regex, s)

if matched: print(matched.groupdict())

`

Suppose li is [3, 4, 5, 20, 5, 25, 1, 3], what is li after li.pop(1)?

time.time() returns ________

What will be the output of the following code?

Python `

def outer(): x = 10 def inner(): nonlocal x x += 5 return x return inner

closure = outer() print(closure()) print(closure())

`

There are 10 questions to complete.

Take a part in the ongoing discussion