You're close and your thinking is right.
When you input() a string a numbers separated by a space, you need to convert each number into an integer, because by default all arguments are string for input.
You can use the map function to convert each input to integer.
inp = map(int, input().split())
Here input().split()
converts 1 5 3 2
to ['1', '5', '3', '2']
Then applying map(int, [1, 5, 3, 2]) is equivalent to doing int(1), int(5) to each element.
Syntax of map: map(function, Iterable)
function is int()
in out case.
Then as you have the integers, all you need to do is take each value and print the number of '$'
for val in inp:
print('$'*val)
Here's the complete code:
inp = map(int, input().split())
for val in inp:
print('$'*val)
$
$$$$$
$$$
$$