How would I pass something from a driver into a list inside a class. I then need remove a word from the list and replace it with a new word.
Jump to Post
You are mixing strings and lists. This should help.
class Sentence: def __init__(self, astr="I'm going back"): self.astr = astr def setWord(self, astr): self.astr=astr def getfirstword(self): return ' Changer the word back', self.astr def getallword(self): print "astr", self.astr astr_list = self.astr.split() print "astr_list", astr_list astr_list = "XXX" print …
All 4 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.