Hello! There is a Python script, everything works, but there is one disadvantage: there are a couple of places in the code where the user must insert the path to the file. and since \ must be escaped, then you have to write \\, for example C: \\ papka \\ file.txt which is inconvenient, I would like the user to just copy and paste C: \ papka \ file.txt How to achieve this? code like this:
perv = input ('Π£ΠΊΠ°ΠΆΠΈΡΠ΅ ΠΏΡΡΡ ΠΊ ΠΈΠ·ΠΌΠ΅Π½ΡΠ΅ΠΌΠΎΠΌΡ ΡΠ°ΠΉΠ»Ρ, \ Π·Π°ΠΌΠ΅Π½ΠΈ Π½Π° \\\: ') vtor = input ('ΠΡΠ΄Π° ΡΠΎΡ
ΡΠ°Π½ΠΈΡΡ ΠΈΠ·ΠΌΠ΅Π½Π΅Π½Π½ΡΠΉ ΡΠ°ΠΉΠ», \ Π·Π°ΠΌΠ΅Π½ΠΈ Π½Π° \\\: ') inp = open (perv, 'r') out = open (vtor, 'w')
C:/papka/file.txt- gil9red