Which of the follow...
 
Notifications
Clear all

Which of the following is not a keyword in python?

2 Posts
1 Users
0 Likes
63 Views
Fahad
(@fahad)
Posts: 412
Prominent Member
Topic starter
 

Question: Which of the following is not a keyword in python?

 

Options are:

 

a). eval
b). assert
c). nonlocal
d). pass

 

correct answer is in reply.

 

 

 
Posted : 19/03/2023 2:14 pm
Fahad
(@fahad)
Posts: 412
Prominent Member
Topic starter
 

Correct option is:

 

a). eval

 

Explanation: eval() will treat all of them as local variables. If you try to use keyword arguments when calling eval() , then you'll get a TypeError explaining that eval() takes no keyword arguments. So, you need to supply a globals dictionary before you can supply a locals dictionary.

 
Posted : 19/03/2023 2:15 pm
Share:
Scroll to Top