+ 1
When i define z=print(dict,end="") i get the output in one line?and the list output is dismiss but why?
text=input() dict={} for letter in text: dict[letter]=text.count(letter) z=print(dict,end="" )
2 odpowiedzi
0
Indentation matters
0
# Hi! You can use prints parameters sep and end to change tje behavior to the print function:
# The default arguments for this are
# sep=' ' and end='\n' (new line)
# Example:
print(1, 2, 3)
# 1 2 3
#
print(1, 2, 3, sep=' ') # Same as above.
# 1 2 3
# 1 2 3
#
print(1, 2, 3, sep='-')
# 1 2 3
# 1 2 3
# 1-2-3
#
print()
#
print(4, 5, 6, end='')
# 4 5 6
print(7, 8, 9, end='***\n\n\t')
# 4 5 67 8 9***
#
print("a", "b", "c")
# 4 5 67 8 9***
#
# a b c
#