I was playing around with the game files of a game called "Doki Doki Literature Club" made in renpy
a visual novel engine written in python . Some lines made me curious :
$ persistent.playthrough = 1
$ persistent.anticheat = renpy.random.randint(100000, 999999)
$ renpy.save_persistent()
$ delete_character("sayori")
$ in_sayori_kill = True
What is "$" used for?
This is a RenPy-specific construct, not directly part of the python programming language. RenPy mentions it in its guide to python statements:
Note that your RenPy programs/visual novels are not written in Python; they're written in RenPy's own scripting language, which is similar to python in several ways but also notably different. If you want to invoke pure python, you have to do it in the ways that RenPy's scripting language allows.