Hallo, ich bin neu in Python und ich begegnet diesen Fehler:Datei für Anfänger in Python Umgang
C:\Users\Dylan Galea\Desktop\Modelling and CS>python file_handling.py
File "file_handling.py", line 4
np.savetxt(\Users\Dylan Galea\Desktop\Modelling and
CS\test.txt,twoDarray,delimeter='\t') ^ SyntaxError: unexpected character after line continuation character
mein Code ist dies:
import numpy as np
twoDarray =np.array([[1,2,3],[4,5,6]])
np.savetxt(\Users\Dylan Galea\Desktop\Modelling and CS\test.txt,twoDarray,delimeter='\t')
kann jemand bitte helfen?
Sie müssen den Pfad als String angeben, indem Sie Anführungszeichen verwenden, z. B. "Benutzer/Dylan Galea/Desktop/Modeling und CS/test.txt". Beachten Sie, dass '\' wie '\\' maskiert werden muss und wenn Ihr Pfad mit einem '\' oder '/' beginnt, sollte es absolut sein. –