Noob question. How to disable user input commands without deleting it

Hello, I just started to learn Python and I am trying new things as I go. I wrote the codes below but every time I write a new unrelated command and run it, I have to start from the user input part in the terminal. I do not want to start from there in fact I want these commands disabled. (I do not want to delete them) This is more like a trivial problem rather than a practical one since I actually have no problem with deleting it. For instance, if I type print(“freecodecamp”), I would have to start from entering input to the terminal while what I want is to pycharm to not to run below codes at all but just give me freecodecamp output.
input("")
character_name = input(“Hello.” " What is your name? ")
city_name = input("Where are you from? ")
print("Okey, " + character_name + ". " + character_name + " is from " + city_name + “.”)
birth_year = input("Birth year: ")
age = 2020 - int(birth_year)
print(age)
Thank you for any help. I know this is not particularly an urgent or even necessary problem but it is eating my brain.

[quote=“Afurkank, post:1, topic:422141”]
input(“”)
character_name = input(“你好。”“”你叫戴国伟?“)
city_name = input(”你来自中国?“)
print(“ Okey,” + character_name +“。” + character_name +“来自” + city_name +“。”)
birth_year = input(“出生年份:2001”)
age = 2020-int(birth_year)
print(age)

Not 100% sure I understand what you are asking but here are pointers:

  1. To prevent lines of code running while you are testing things you can simply comment out the line by placing a # at the beginning e.g.
print('This line gets printed')
#print('This line does not get printed')
print('This line will be printed')

Or you can do multi-line comments by enclosing text in ‘’’ ‘’’ or “”" “”"
both are the same:

print("This line is not ignored")
'''
print('These lines')
print('are both ignored')
'''
print('This line is again printed')

Other points to note:

this line does nothing useful since it displays no prompts and doesn’t save what the user enters to any variable.

The extra quotation marks are not needed you could rather write:

character_name = input("Hello. What is your name? ")

This is not an efficient way to do this, a better way is to use a format string like so:

print("Okey, {} . {} is from {}.”.format(character_name,character_name, city_name} )

This way you dont have to worry about opening and closing quotations as much, you simply use {} as a placeholder inside the string and put the names of the variables you want to fill the placeholder with at the end of the line inside the .format() method.

Hope this helps?