Subjects

All subjects Django Java Python React Spring Boot JavaScript PHP
Sign Up Free
Python 10 questions

Python Basics & Syntax

Master core Python syntax, indentation rules, variable definitions, standard operators, arithmetic flow, and basic inputs/outputs.

More Python
Interview questions 1–10 of 10
1

What is Python and what are its key features?

Python is a high-level, interpreted, dynamically-typed programming language known for readable syntax and a hu...

Read answer →
2

What is the difference between a list and a tuple in Python?

AspectListTupleMutabilityMutable - can change after creationImmutable - cannot changeSyntax[1, 2, 3](1, 2, 3)P...

Read answer →
3

How does Python's indentation-based syntax work, and why does it matter?

Python uses indentation (whitespace) instead of braces {} to define code blocks. Consistent indentation is man...

Read answer →
4

What is the difference between == and is in Python?

OperatorChecks==Value equality - do the objects contain the same value?isIdentity equality - are they the SAME...

Read answer →
5

What are Python's built-in data types?

CategoryTypesNumericint, float, complexSequencestr, list, tuple, rangeMappingdictSetset, frozensetBooleanboolB...

Read answer →
6

What is the difference between mutable and immutable objects in Python?

MutableImmutablelist, dict, setint, float, str, tuple, frozenset, boolCan be changed in placeCannot be changed...

Read answer →
7

What are *args and **kwargs used for in Python functions?

SyntaxCollectsAccessed as*argsExtra positional argumentsTuple**kwargsExtra keyword argumentsDictionarydef desc...

Read answer →
8

What is the difference between deep copy and shallow copy in Python?

TypeBehaviorShallow copyCopies the outer object; nested objects are still shared referencesDeep copyRecursivel...

Read answer →
9

What is the difference between a Python list, dictionary, and set in terms of use case?

StructureOrdered?Duplicates?Access byBest forlistYesAllowedIndexOrdered sequences, need duplicatesdictYes (ins...

Read answer →
10

What is PEP 8 and why does it matter?

PEP 8 is Python's official style guide, defining conventions for naming, indentation, line length, imports, an...

Read answer →