I have a string that loks like "u'mystring'". i'm wondering if ther is a easy way to remove the u'' part of the string?
Jump to Post
s = "u'mystring'" # assuming it is always u' s2 = s.replace("u'", "'") print s2 # 'mystring'
All 6 Replies
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.