Matplotlib: how to plot a random colour to all countries from the list?

How do I assign a random colour to each of the countries of the list to plot on the map?

import matplotlib.pyplot as plt
import numpy as np
import geopandas as gpd


world = gpd.read_file(gpd.datasets.get_path('naturalearth_lowres'))
ax2 = world.plot(figsize=(15,15), edgecolor=u'white', color='gray')


countries = ['Germany', 'Norway', 'Russia', 'China', 'Japan']

world.loc[world['name'].isin(countries)].plot(edgecolor=u'white', color=np.random.rand(3,), ax=ax2)

ax2.axis('scaled')
plt.show()

It looks like this now: enter image description here

Answer

I added these lines:

for name in (countries):
    world.loc[world['name'].eq(name)].plot(edgecolor=u'white', color=np.random.rand(3,), ax=ax2)

instead of this line:

world.loc[world['name'].isin(countries)].plot(edgecolor=u'white', color=np.random.rand(3,), ax=ax2)

Whole code:

import matplotlib.pyplot as plt
import numpy as np
import geopandas as gpd


world = gpd.read_file(gpd.datasets.get_path('naturalearth_lowres'))
ax2 = world.plot(figsize=(15,15), edgecolor=u'white', color='gray')


countries = ['Germany', 'Norway', 'Russia', 'China', 'Japan']
for name in (countries):
    world.loc[world['name'].eq(name)].plot(edgecolor=u'white', color=np.random.rand(3,), ax=ax2)

ax2.axis('scaled')
plt.show()

Output:

enter image description here