Tokens are small units of a program that the interpreter or compiler understands. Yeh identifiers, keywords, literals, operators, aur punctuators ko include karte hain.
Keywords hote hain special ya reserved words Python mein jo variable names ke roop mein use nahin kiye ja sakte.
Identifiers hote hain names jo variables, functions, classes, modules, ya other objects ko identify karne ke liye use hote hain. Inhe kuch rules follow karna chahiye:
Valid identifiers : `my_variable`, `_value`, `Class1`, `function_name`
Invalid identifiers: `1variable`, `class`, `if` (because they are keywords)
Literals hote hain constants jo fixed values ko represent karte hain. Python mein various data types hote hain jaise integers, floats, strings, booleans, lists, tuples, dictionaries, etc.
Operators hote hain symbols jo variables ya values par operations perform karte hain.
Punctuators hote hain symbols jo Python syntax mein punctuation ke liye istemal hote hain, jaise parentheses `()`, commas `,`, colons `:`, semicolons `;`, etc.
Valid identifiers : `my_variable`, `_value`, `Class1`, `function_name`
Invalid identifiers: `1variable`, `class`, `if` (because they are keywords)
Data ko console par output karne ke liye istemal hota hai.
Shartanuma statements allow karte hain ki certain code conditions par execute ho.
Loops ka istemal statements ki ek sequence ko iterate karne ya ek block of code ko repeat karne ke liye hota hai.
Lists ordered collections of items hote hain. Yeh indexing ko support karte hain (elements ko position ke hisab se access karna) aur ek length (elements ka number) rakhte hain.
NumPy ek powerful library hai Python mein jo numerical computations aur array operations ke liye istemal hoti hai.
pandas ek data manipulation aur analysis library hai Python mein.
scikit-learn ek machine learning library hai Python mein jo various machine learning algorithms aur utilities provide karta hai.
shabd ek Python data type hai jo string manipulation ke liye various methods provide karta hai. Yeh methods text ko modify karne, search karne, aur format karne ke liye upyogi hain.