First of all, your if
statement is not correct, or not what I assume you intend it to be like.
The input()
function always returns a string, so there is no need to use the str(...)
beforehand.
Secondly, this statement also returns the first str
(from left to right) that is not empty. So
"JARVIS Open Spotify" or "Hey Jarvis open spotify" or "Open spotify" or "launch spotify"
Is just "JARVIS Open Spotify"
. Again, no need to use the str
builtin.
Lastly, this is not the path for the Spotify.exe
, I assume you tried to copy the path with ctrl+shift+c
or similar command. The default executable can be found under C:\Users\<Your_User>\Local\Microsoft\WindowsApps\Spotify.exe
Try to search for Spotify.exe
, hold shift, right click on the Spotify.exe
and click on copy as path