python abspath returning path twice
问题 I'm trying to get an absolute path of a relative path string with python but it keeps printing the path twice. For example: self.path = 'Users/abdulahmad/Desktop' self.actual_path = os.path.abspath(self.path) print self.actual_path my console prints /Users/abdulahmad/Desktop/Users/abdulahmad/Desktop and if I change the path to: self.path = 'Desktop' my console prints: /Users/abdulahmad/Desktop/Desktop shouldn't it just print /Users/abdulahmad/Desktop in both cases? 回答1: Probably because the