r/PowerShell • • Sep 17 '20

PowerShell vs Python Reference

https://blog.ironmansoftware.com/powershell-vs-python/
206 Upvotes

51 comments sorted by

View all comments

3

u/[deleted] Sep 17 '20

regarding:

PowerShell:

[string]myfunc() {
    return "Hello my name is $($this.Name)"
}

Python:

def myfunc(self):
    print("Hello my name is " + self.name)

print() doesn't return a string in Python.