Reputation: 1
I'm new to VS Code. I run simple function in Python and want to see output. I use "Debug" -> "Start Debugging".
def double_char_function(string):
string = 'abc'
return_string = ''
for char in string:
return_string += char*2
return return_string
I want to see the output:
aabbcc
I saw it when I run it. But don't know how to see it again. Please, help me to use VS Code.
Screenshots:
Kind regards, Anna
Upvotes: 0
Views: 665
Reputation: 29
Try:
def double_char_function(string):
return_string = ''
for char in string:
return_string += char*2
return return_string
string = "Hello!"
print(double_char_function(string))
Upvotes: 0
Reputation: 1
Apart from the solutions provided above, I'd recommend you to learn the basics from a YouTube tutorial (eg. tutorials by CoreyMS, Mosh, etc), since it's always better to learn systematically especially for a beginner.
Upvotes: 0
Reputation: 11
Try:
def double_char_function(string):
return_string = ''
for char in string:
return_string += char*2
return return_string
print(double_char_function('abc'))
Upvotes: 1