InterviewTreedInterviewTreed

The question library

Technical interview questions and answers

Explore practical questions, clear explanations, and code examples across developer technologies.

Showing 2905–2916 of 3610 questions

Python ProgrammingBeginner1 min read

F-strings

F-strings interpolate expressions and support format specifiers.

Python ProgrammingBeginner1 min read

Type conversion

Constructors such as int, float, str, list, tuple, and set convert compatible values.

Python ProgrammingBeginner1 min read

None

None represents absence of a value or an optional result; compare with is None.

Python ProgrammingBeginner1 min read

if/elif/else

Conditional branches run according to the first matching condition.

Python ProgrammingBeginner1 min read

while loops

A while loop repeats while its condition is true; update state so it can terminate.

Python ProgrammingBeginner1 min read

Functions

Functions package reusable behavior and may return values.

Python ProgrammingBeginner1 min read

Default arguments

Default expressions are evaluated once when a function is defined; avoid mutable defaults when a fresh object is intende…

Python ProgrammingBeginner1 min read

*args and **kwargs

*args collects extra positional arguments into a tuple; **kwargs collects keyword arguments into a dictionary.

Python ProgrammingBeginner1 min read

LEGB scope

Name lookup checks Local, Enclosing, Global, then Built-in scopes.