How to do a indentation in python?
if you wanna add an indentation to say a file or print it, just in your print statement put print(" "). Btw theres 4 spaces in there. If you just mean when your writing code then: on pc press tab (near top left of your keyboard) on mobile on sololearn press tab (top left of your keyboard) any other time where tab isn't available just hit space 4 times also \t
Yea, You can use 4 space or 2 space for tab to indentation in Python If (a>b): print (a) //4 space or 2 space Something like that...
You can use space as your indentation by clicking the space bar four times
lol thx Sâñtôsh
Nice advice TriFoxi
Ur welcome TriFoxi Are you beginner ??
Indentation works in some expressions such as conditional expression. Indentation refers to the spaces at a beginning of a code line. I would like to mention one example of conditional expression where indentation is used:- If (5>2) : print("five is greater than two. ")
Soo you have to chose wich form of indentation you use if you use 4 spaces than you have to use the 4 spaces in your whole code if you mixed it with tabs than you get an error. Maybe you align all the code to the left side and indent it again and dont forget use 4 Spaces OR tab NOT both That should fix your error
Indentation is very important in python and use of indentation in python is given below:- if 5>3: print("Five is greater than three. ")
S3R43o3 Each block must have the same indentation, but different blocks in your code can have different levels of indentation.
Anonymous ofc on block 4 spaces or 1 tab … if you need more cause if statements or so on you have to do 8 spaces or 2 tabs and so on …
How do I generate a list with <N> unique elements randomly selected from another (already existing) list?
Given three integer matrices A(m*n),B(m*n) and C(m*n) . Print the one with more zero elements. beside code
I'm coding this for hours & can't make the value of the 5 random numbers round off to 2 decimal places like in the examples
Overloading + operator
( NEED HELP ) Halloween candy