The backend is sending code to me in plain text format. Here's an example:
def countNegatives(matrix): count = 0 for row in matrix: for num in row: if num < 0: count += 1 return count
It's just basic text, but I need to show this to the user in a well-organized manner. Like the one below...
def countNegatives(matrix):
count = 0
for row in matrix:
for num in row:
if num < 0:
count += 1
return count
I want to display formatted code snippets for Javascript, Python, Java, C, C++, Ruby, and CSS. Can anyone guide me on how to achieve this? Any help would be highly appreciated...