What do all the whitespaces do? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

What do all the whitespaces do?

What do \t,\r,\v and \f do? I don't think this was ever explained.

29th Jan 2017, 12:57 PM
Ryan S
Ryan S - avatar
4 Answers
+ 5
\t horizontal tabulation \r carriage return ( not used in unix-like os, used with \n new line in widows os ) \v vertical tabulation ( not really used, JSON unauthorized ) \f form feed ( not used, control char for printers ) Controls characters are not design to be printed, so they are commonly assimilate to whitespaces ^^ ( in regex for example )
29th Jan 2017, 6:41 PM
visph
visph - avatar
+ 1
its formatation stuff.
29th Jan 2017, 2:16 PM
Jhonnatha Andrade
Jhonnatha Andrade - avatar
0
white spaces are very annoying if you don't know how to manage them. It usually has to do with user input. Example: (underscores represent whitespaces) _______chicken54__ It says that he put so and so spaces before and after his input. If you don't remove whitesace with example.lstrip() or example.rstrip(), the computer will be messed up and won't know what to do. You can also use example.strip() to remove ALL whitespace. I don't know where you got those forward-slash commands from and what they do though.
29th Jan 2017, 1:26 PM
DerpyOmnister
DerpyOmnister - avatar
0
thx
29th Jan 2017, 7:15 PM
DerpyOmnister
DerpyOmnister - avatar