日本語ver Introduction Miss succeed Reference Introduction I want to display following print in Command line. apple apple apple apple apple Miss However, This print is not able to display following code used print script. def main () : i = 0 while i< 5 : print( 'apple' ) j = 0 while j < i: print( ' ' ) j = j + 1 i = i + 1 if __name__ == '__main__' : main() rusult… Print code change line when writing new apple. succeed Please, look at following code. import sys def main () : i = 0 while i < 5 : print( 'apple' ) j = 0 while j <= i: sys.stdout.write( ' ' ) j = j + 1 i = i + 1 if __name__ == '__main__' : main() sys.stdout.write is write string regardless of the changing line. Result! However, I give you a strong warning that s...
This blog is my learning memo. I write post about ML, math, programing, other. Please click slidebar icon to look for post by contents. content name of post written by Japanese is written Japanese. content name of post written by English is written English. Please look at my post to enjoy and learn ML.