Computer Science, asked by nahu2, 11 months ago

Which argument of print()would you set for:changing the default separate (space)

Answers

Answered by lovingheart
6

Answer:

sep parameter  

Explanation:

The separator in print statement by default is space. If a user likes to change the way the output is displayed with his/ her own parameter, it is possible with the help of python’s sep parameter.

Example 1: If you want to format date:

print(‘01’, ‘08’, ‘2019’, sep = ‘/’)

Output: 01/08/2019

Example 2: If you want to create hyphenated words

print(‘well’, ’known’, sep=’-‘);

Output: well-known

This feature is available from phython 3.x or later. You can use any of the characters from the keyboard as a separator

Similar questions