8/30/2023 0 Comments Python print without newlineIn practice, this is becoming a shorter of a problem. Thus, we got to know that different platforms have different conventions. MS-DOS chose CR+LF, and windows inherited \n as a new line. For some reason, in Unix/Linux world, a single LF(Line feed) was chosen as the new line marker. The difference is simple, i.e., OS designers had to choose how we should represent a new line in text in computer files. But, for different operating systems, there are different conventions. How \r and \n is handled on Linux and windowsĪs we all know, we are using \r for carriage return and \n for newline in windows. Then, we have applied all the characters like \t for tab space, \n for the new-line, and \r for carriage return. Firstly, we have taken an input string as str.Str = ('\tlatracal\rsolution\n\tis a\rwebsite\n')
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |