Piggy
Piggy

Reputation: 67

How Can I Print Something That Has a Lot of Apostrophes?

I am wondering how it would be possible to print this out in python:

yes2 = "document.querySelector('[ng-controller="inventoryController"]
 [ng-src="https://tr.rbxcdn.com/79a405190ab6aab0429c1eb4f083cfea/150/150/Hat/Png"]

because if I do this in python using pyautogui:

pyautogui.typewrite("'yes2 = "document.querySelector('[ng-controller="inventoryController"] [ng-src="https://tr.rbxcdn.com/79a405190ab6aab0429c1eb4f083cfea/150/150/Hat/Png"])'")

I get a syntax error

Upvotes: 0

Views: 134

Answers (1)

Jibraeel Abdelwahhab
Jibraeel Abdelwahhab

Reputation: 55

Triple quotes.

print('''yes2 = "document.querySelector('[ng-controller="inventoryController"] [ng-src="https://tr.rbxcdn.com/79a405190ab6aab0429c1eb4f083cfea/150/150/Hat/Png"]''')

Upvotes: 1

Related Questions