Feb-08-2020, 01:50 AM
Hey all,
I'm pretty new to the world of Python but I would really appreciate some help with a small problem I seem to be having. If it helps, I am using Ubuntu Linux 18.04 on Virtual Box from a Windows 10 laptop with gnome desktop. Entering the command 'Python3' in the terminal shows me that I have Python 3.6.9 installed. I am using sublime text editor to work on some basic coding.
Right now I am having a problem with f-strings. I am using the book "PYTHON crash course" and am currently on page 21. From what I have read online F-String were updated in Python 3.6 so you include 'f' before the parenthesis, which would do that same thing as '.format' in earlier versions of Python. My problem is that whenever I attempt to run a code with 'f' I get a syntax error. I'm not sure if my version is incorrect, I am entering the code incorrectly, or something else entirely is wrong. Below is a description of the issue I am having. I re-wrote the code because I cannot copy and paste from the virtual box... not exactly sure how to fix that either
"SyntaxError: invlalid syntax" and it shows me the full path of my shell_cmd, dir and path. Any ideas on why this is giving me an error? I appreciate your help!
I'm pretty new to the world of Python but I would really appreciate some help with a small problem I seem to be having. If it helps, I am using Ubuntu Linux 18.04 on Virtual Box from a Windows 10 laptop with gnome desktop. Entering the command 'Python3' in the terminal shows me that I have Python 3.6.9 installed. I am using sublime text editor to work on some basic coding.
Right now I am having a problem with f-strings. I am using the book "PYTHON crash course" and am currently on page 21. From what I have read online F-String were updated in Python 3.6 so you include 'f' before the parenthesis, which would do that same thing as '.format' in earlier versions of Python. My problem is that whenever I attempt to run a code with 'f' I get a syntax error. I'm not sure if my version is incorrect, I am entering the code incorrectly, or something else entirely is wrong. Below is a description of the issue I am having. I re-wrote the code because I cannot copy and paste from the virtual box... not exactly sure how to fix that either

first_name = "ada" last_name = "Lovelace" full_name = f"{first_name} {last_name}" print{full_name}After running this code I receive an error message stating something akin to
"SyntaxError: invlalid syntax" and it shows me the full path of my shell_cmd, dir and path. Any ideas on why this is giving me an error? I appreciate your help!