Last active
June 5, 2024 19:19
-
-
Save Delta456/265ca77e06f52e1681c96630111c2dd6 to your computer and use it in GitHub Desktop.
Python Print in V
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os { flush } | |
struct Print { | |
sep string = ' ' | |
end string = '\n' | |
} | |
fn (p Print) print(args ...string) { | |
for i, arg in args { | |
print(arg) | |
if i < args.len - 1 { | |
print(p.sep) | |
flush() | |
} | |
} | |
print(p.end) | |
flush() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment