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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
chetanhiwale
Contributor

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
Honored Contributor

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
nilendraFabric
Honored Contributor

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.

 

v-nmadadi-msft
Honored Contributor II

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

v-nmadadi-msft
Honored Contributor II

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
Honored Contributor II

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
Honored Contributor II

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

Helpful resources

Announcements
Users online (25)