AttributeError: el objeto 'módulo' no tiene atributo 'call': Python
Soy nuevo en Python y no sé qué está pasando aquí. He intentado buscar mucho pero tuve que terminar preguntando aquí
Estoy tratando de aprender el subproceso que ejecuta un comando simple como:
import subprocess
subprocess.call(['ls'])
Ahora, cuando ejecuto el programa me sale este error:
Traceback (most recent call last):
File "subprocess.py", line 1, in <module>
import subprocess
File "/task/subprocess.py", line 2, in <module>
subprocess.call(['ls'])
AttributeError: 'module' object has no attribute 'call'