Python Forum
[Variable as a String]>EscaSpecial characters printed
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Variable as a String]>EscaSpecial characters printed
#5
Just use all \(backslash) the other way(/),the no octal value or other escape characters problems.
>>> s = '\4.1'
>>> s
'\x04.1'
>>> print(s)
.1
>>> # Fix
>>> s = '/4.1'
>>> s
'/4.1'
>>> print(s)
/4.1
>>> s = 'C:/Program Files (x86)/Citrix/ICA Client/4.1/wfcrun32.exe'
>>> print(s)
C:/Program Files (x86)/Citrix/ICA Client/4.1/wfcrun32.exe
Reply


Messages In This Thread
RE: [Variable as a String]>EscaSpecial characters printed - by snippsat - Mar-28-2017, 11:59 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  coma separator is printed on a new line for some reason tester_V 4 550 Feb-02-2024, 06:06 PM
Last Post: tester_V
  doing string split with 2 or more split characters Skaperen 22 2,677 Aug-13-2023, 01:57 AM
Last Post: Skaperen
  Replacing String Variable with a new String Name kevv11 2 819 Jul-29-2023, 12:03 PM
Last Post: snippsat
  How do I check if the first X characters of a string are numbers? FirstBornAlbratross 6 1,593 Apr-12-2023, 10:39 AM
Last Post: jefsummers
  Need help on how to include single quotes on data of variable string hani_hms 5 2,136 Jan-10-2023, 11:26 AM
Last Post: codinglearner
  python r string for variable mg24 3 2,912 Oct-28-2022, 04:19 AM
Last Post: deanhystad
  USE string data as a variable NAME rokorps 1 990 Sep-30-2022, 01:08 PM
Last Post: deanhystad
  How can histogram bins be separated and reduce number of labels printed on x-axis? cadena 1 916 Sep-07-2022, 09:47 AM
Last Post: Larz60+
  Removing Space between variable and string in Python coder_sw99 6 6,384 Aug-23-2022, 01:15 PM
Last Post: louries
  Remove a space between a string and variable in print sie 5 1,846 Jul-27-2022, 02:36 PM
Last Post: deanhystad

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020