NVIDIA interview question

Python Coding - Write a function that takes a string as an input and returns all permutations of that string. Do not use any inbuilt packages.