close

[Solved] Statements must be separated by newlines or semicolons

Hello Guys, How are you all? Hope You all Are Fine. Today I am just trying to print my text but I am facing following warning in vs code Statements must be separated by newlines or semicolons in python. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How Statements must be separated by newlines or semicolons Error Occurs ?

I am just trying to print my text but I am facing following warning in vs code.

Statements must be separated by newlines or semicolons

Here is my python code

print data.username

I am facing following error.

SyntaxError: invalid syntax

How To Solve Statements must be separated by newlines or semicolons Error ?

  1. How To Solve Statements must be separated by newlines or semicolons Error ?

    To Solve Statements must be separated by newlines or semicolons Error In Python 3.x We need to use enclose arguments like this print(data.username).

  2. Statements must be separated by newlines or semicolons

    To Solve Statements must be separated by newlines or semicolons Error In Python 3.x We need to use enclose arguments like this print(data.username).

Solution 1: use enclose arguments 

In Python 3.x We need to use enclose arguments like this.

print(data.username)

Summary

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?

Also, Read

Please Rate Our Solution to Motivate Us For Give Our Best

Leave a Comment