Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
chetanhiwale
Helper III
Helper III

Fabric notebook backslash issue

chetanhiwale_0-1739511345766.png

This should print \\n as output. Is this happening due to pylantic or fabric is doing something internally. 

1 ACCEPTED SOLUTION
nilendraFabric
Super User
Super User

When you write a literal like `"\\",` Python processes it as an escape sequence. In this context, a pair of backslashes (`"\\") tells Python to include a single literal backslash in the string.

 

View solution in original post

5 REPLIES 5
v-nmadadi-msft
Community Support
Community Support

Hi @chetanhiwale ,

As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided by the community members for the issue worked. If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.

 

Thanks and regards

v-nmadadi-msft
Community Support
Community Support

Hi @chetanhiwale,

I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.


Thank you.

v-nmadadi-msft
Community Support
Community Support

Hi @chetanhiwale,

May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

Thank you.

 

v-nmadadi-msft
Community Support
Community Support

Hi @chetanhiwale  ,
Thanks for reaching out to the Microsoft fabric community forum.

This is not an issue with Fabric, as this is an expected python output. Any python interpreter will return the same output.
As @nilendraFabric  suggested the code is using an escape character. To insert characters that are illegal in a string, escape characters are used.

If you find this post helpful, please mark it as an "Accept as Solution" and consider giving a KUDOS.
Thanks and Regards

nilendraFabric
Super User
Super User

When you write a literal like `"\\",` Python processes it as an escape sequence. In this context, a pair of backslashes (`"\\") tells Python to include a single literal backslash in the string.

 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

June FBC25 Carousel

Fabric Monthly Update - June 2025

Check out the June 2025 Fabric update to learn about new features.