<human>:  Give me a Python function to expandvars non defined.
<bot>: Here is a Python function to expandvars non defined

import re

def expandvars(text):
  """Expand all variables in a string.

  :param str text:
  :rtype: str
  :return:
  """
  return text.replace('$', '$1')

# Enter the string
string = "${username}${password}"

# Calling the function
print((expandvars(string)))

#Example Output
# $1{username}$1{password}

#Remember to inspect code for bugs.